home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1997 October: Mac OS SDK / Dev.CD Oct 97 SDK1.toast / Development Kits (Disc 1) / Interfaces&Libraries / Universal / Interfaces / PInterfaces / ENET.p < prev    next >
Encoding:
Text File  |  1997-08-12  |  3.6 KB  |  124 lines  |  [TEXT/MPS ]

  1. {
  2.      File:        ENET.p
  3.  
  4.      Contains:    Ethernet Interfaces.
  5.  
  6.      Version:    Technology:    System 7.5
  7.                  Release:    Universal Interfaces 3.0.1
  8.  
  9.      Copyright:    © 1990-1997 by Apple Computer, Inc., all rights reserved
  10.  
  11.      Bugs?:        Please include the the file and version information (from above) with
  12.                  the problem description.  Developers belonging to one of the Apple
  13.                  developer programs can submit bug reports to:
  14.  
  15.                      devsupport@apple.com
  16.  
  17. }
  18. {$IFC UNDEFINED UsingIncludes}
  19. {$SETC UsingIncludes := 0}
  20. {$ENDC}
  21.  
  22. {$IFC NOT UsingIncludes}
  23.  UNIT ENET;
  24.  INTERFACE
  25. {$ENDC}
  26.  
  27. {$IFC UNDEFINED __ENET__}
  28. {$SETC __ENET__ := 1}
  29.  
  30. {$I+}
  31. {$SETC ENETIncludes := UsingIncludes}
  32. {$SETC UsingIncludes := 1}
  33.  
  34. {$IFC UNDEFINED __TYPES__}
  35. {$I Types.p}
  36. {$ENDC}
  37. {$IFC UNDEFINED __OSUTILS__}
  38. {$I OSUtils.p}
  39. {$ENDC}
  40.  
  41.  
  42. {$PUSH}
  43. {$ALIGN MAC68K}
  44. {$LibExport+}
  45.  
  46.  
  47. CONST
  48.     ENetSetGeneral                = 253;                            { Set "general" mode }
  49.     ENetGetInfo                    = 252;                            { Get info }
  50.     ENetRdCancel                = 251;                            { Cancel read }
  51.     ENetRead                    = 250;                            { Read }
  52.     ENetWrite                    = 249;                            { Write }
  53.     ENetDetachPH                = 248;                            { Detach protocol handler }
  54.     ENetAttachPH                = 247;                            { Attach protocol handler }
  55.     ENetAddMulti                = 246;                            { Add a multicast address }
  56.     ENetDelMulti                = 245;                            { Delete a multicast address }
  57.  
  58.     EAddrRType                    = 'eadr';                        { Alternate address resource type }
  59.  
  60.  
  61. TYPE
  62.     EParamBlockPtr = ^EParamBlock;
  63.     EParamBlkPtr                        = ^EParamBlock;
  64.     ENETCompletionProcPtr = Register68kProcPtr;  { PROCEDURE ENETCompletion(thePBPtr: EParamBlkPtr); }
  65.  
  66.     ENETCompletionUPP = UniversalProcPtr;
  67.     EParamBlock = PACKED RECORD
  68.         qLink:                    QElemPtr;                                { General EParams }
  69.         qType:                    INTEGER;                                { queue type }
  70.         ioTrap:                    INTEGER;                                { routine trap }
  71.         ioCmdAddr:                Ptr;                                    { routine address }
  72.         ioCompletion:            ENETCompletionUPP;                        { completion routine }
  73.         ioResult:                OSErr;                                    { result code }
  74.         ioNamePtr:                StringPtr;                                { ->filename }
  75.         ioVRefNum:                INTEGER;                                { volume reference or drive number }
  76.         ioRefNum:                INTEGER;                                { driver reference number }
  77.         csCode:                    INTEGER;                                { Call command code }
  78.         CASE INTEGER OF
  79.         0: (
  80.             eProtType:            INTEGER;                                { Ethernet protocol type }
  81.             ePointer:            Ptr;                                    { No support for PowerPC code }
  82.             eBuffSize:            INTEGER;                                { buffer size }
  83.             eDataSize:            INTEGER;                                { number of bytes read }
  84.            );
  85.         1: (
  86.             eMultiAddr:            PACKED ARRAY [0..5] OF Byte;            { Multicast Address }
  87.            );
  88.     END;
  89.  
  90.  
  91. CONST
  92.     uppENETCompletionProcInfo = $00009802;
  93.  
  94. PROCEDURE CallENETCompletionProc(thePBPtr: EParamBlkPtr; userRoutine: ENETCompletionUPP);
  95.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  96.     {To be implemented:  Glue to move parameters into registers.}
  97.     {$ENDC}
  98.  
  99. FUNCTION NewENETCompletionProc(userRoutine: ENETCompletionProcPtr): ENETCompletionUPP;
  100.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  101.     INLINE $2E9F;
  102.     {$ENDC}
  103. FUNCTION EWrite(thePBptr: EParamBlkPtr; async: BOOLEAN): OSErr;
  104. FUNCTION EAttachPH(thePBptr: EParamBlkPtr; async: BOOLEAN): OSErr;
  105. FUNCTION EDetachPH(thePBptr: EParamBlkPtr; async: BOOLEAN): OSErr;
  106. FUNCTION ERead(thePBptr: EParamBlkPtr; async: BOOLEAN): OSErr;
  107. FUNCTION ERdCancel(thePBptr: EParamBlkPtr; async: BOOLEAN): OSErr;
  108. FUNCTION EGetInfo(thePBptr: EParamBlkPtr; async: BOOLEAN): OSErr;
  109. FUNCTION ESetGeneral(thePBptr: EParamBlkPtr; async: BOOLEAN): OSErr;
  110. FUNCTION EAddMulti(thePBptr: EParamBlkPtr; async: BOOLEAN): OSErr;
  111. FUNCTION EDelMulti(thePBptr: EParamBlkPtr; async: BOOLEAN): OSErr;
  112.  
  113.  
  114. {$ALIGN RESET}
  115. {$POP}
  116.  
  117. {$SETC UsingIncludes := ENETIncludes}
  118.  
  119. {$ENDC} {__ENET__}
  120.  
  121. {$IFC NOT UsingIncludes}
  122.  END.
  123. {$ENDC}
  124.